let name = "张三"; // name只能存一个值
name = "李四"

let names = ["张三", "李四", "悟空", "八戒", "如来"] //names存储一组数据
console.log(names)
// 索引
console.log(names[0]);
console.log(names[1]);
console.log(names[2]);
console.log(names[3]);
console.log("=================循环遍历=====================")
//如何通过表达式来表示数组的元素个数 length
console.log(names.length)
for (let i = 0; i < names.length; i++) {
    console.log(names[i])
}